/*
 * Powered By [pkuWx]
 * Web Site: http://www.wuxi.ss.pku.edu.cn
 * Since 2015 - 2015
 */

package cn.edu.pku.wxlib.student.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import cn.edu.pku.wxlib.student.model.*;
import cn.edu.pku.wxlib.student.service.*;
import cn.edu.pku.wxlib.student.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @version 1.0
 * @since 1.0
 */


public class Student extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Student";
	public static final String ALIAS_STUDENT_ID = "studentId";
	public static final String ALIAS_STUDENT_NUMBER = "studentNumber";
	public static final String ALIAS_SCHOOL = "school";
	public static final String ALIAS_MAJOR = "major";
	public static final String ALIAS_DIRECTION = "direction";
	public static final String ALIAS_ENTRANCE_CLASS = "entranceClass";
	public static final String ALIAS_MIN_YEAR = "最短学制";
	public static final String ALIAS_MAX_YEAR = "最长学制";
	
	//date formats
	
	//columns START
    /** studentId       db_column: studentId */	
	
	private java.lang.Integer studentId;
    /** studentNumber       db_column: studentNumber */	
	@NotNull 
	private java.lang.Integer studentNumber;
    /** school       db_column: school */	
	@NotBlank @Length(max=32)
	private java.lang.String school;
    /** major       db_column: major */	
	@NotBlank @Length(max=32)
	private java.lang.String major;
    /** direction       db_column: direction */	
	@NotBlank @Length(max=64)
	private java.lang.String direction;
    /** entranceClass       db_column: entranceClass */	
	@NotBlank @Length(max=10)
	private java.lang.String entranceClass;
    /** 最短学制       db_column: minYear */	
	@NotNull 
	private java.lang.Integer minYear;
    /** 最长学制       db_column: maxYear */	
	@NotNull 
	private java.lang.Integer maxYear;
	//columns END

	public Student(){
	}

	public Student(
		java.lang.Integer studentId
	){
		this.studentId = studentId;
	}

	public void setStudentId(java.lang.Integer value) {
		this.studentId = value;
	}
	
	public java.lang.Integer getStudentId() {
		return this.studentId;
	}
	public void setStudentNumber(java.lang.Integer value) {
		this.studentNumber = value;
	}
	
	public java.lang.Integer getStudentNumber() {
		return this.studentNumber;
	}
	public void setSchool(java.lang.String value) {
		this.school = value;
	}
	
	public java.lang.String getSchool() {
		return this.school;
	}
	public void setMajor(java.lang.String value) {
		this.major = value;
	}
	
	public java.lang.String getMajor() {
		return this.major;
	}
	public void setDirection(java.lang.String value) {
		this.direction = value;
	}
	
	public java.lang.String getDirection() {
		return this.direction;
	}
	public void setEntranceClass(java.lang.String value) {
		this.entranceClass = value;
	}
	
	public java.lang.String getEntranceClass() {
		return this.entranceClass;
	}
	public void setMinYear(java.lang.Integer value) {
		this.minYear = value;
	}
	
	public java.lang.Integer getMinYear() {
		return this.minYear;
	}
	public void setMaxYear(java.lang.Integer value) {
		this.maxYear = value;
	}
	
	public java.lang.Integer getMaxYear() {
		return this.maxYear;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("StudentId",getStudentId())
			.append("StudentNumber",getStudentNumber())
			.append("School",getSchool())
			.append("Major",getMajor())
			.append("Direction",getDirection())
			.append("EntranceClass",getEntranceClass())
			.append("MinYear",getMinYear())
			.append("MaxYear",getMaxYear())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getStudentId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Student == false) return false;
		if(this == obj) return true;
		Student other = (Student)obj;
		return new EqualsBuilder()
			.append(getStudentId(),other.getStudentId())
			.isEquals();
	}
}

